-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Data - CSV Upload UI #6845
Add Data - CSV Upload UI #6845
Conversation
jenkins, test it |
@tsullivan can you look at the test failure here? It seems to be related to the uuid code |
Looking into it. I get the failure locally too |
@rashidkpc looks like all the tests that use this mechanism cause a failure:
The server test suite only passes if I skip all these:
My theory is that the scanDirs/fromRoot setup is calls some constructor function without the |
@Bargs looks like the highland module is purposefully creating a global variable called Source: https://github.com/caolan/highland/blob/master/dist/highland.js#L177 Looks like there is a way to register globals via config with grunt-simple-mocha: https://github.com/yaymukund/grunt-simple-mocha |
Has conflicts that need to be resolved |
Thanks @tsullivan, adding nil to the list of globals fixed the issue. |
3588918
to
cad25fc
Compare
5643e53
to
e9a5ebe
Compare
jenkins, test it |
@@ -28,7 +28,7 @@ modules.get('apps/settings') | |||
_.forEach(res.data, (response) => { | |||
this.created += response.created; | |||
this.formattedErrors = this.formattedErrors.concat(_.map(_.get(response, 'errors.index'), (doc) => { | |||
return `${doc._id.split('-', 1)[0].replace('L', 'Line ').trim()}: ${doc.error.type} - ${doc.error.reason}`; | |||
return `Line ${doc._id.substr(doc._id.lastIndexOf(':') + 1)}: ${doc.error.type} - ${doc.error.reason}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth pulling this logic into a function? Especially since the format of the data has changed now during the development of this feature?
One more small suggested change, not a deal breaker. Once tests pass, LGTM. |
jenkins, test it |
|
Still LGTM. Thanks for addressing the duplicate column issue. |
@Bargs since you seemed to think that the large file importing was caused by misuse of papaparse, I'm sending back to you to fix that. OTT, LGTM! |
Previously I was using PapaParse's preview option, but it turns out that does not prevent the library from loading the entire file if you don't use one of the streaming callbacks. So now we have to do some extra gymnastics to gather the data per row in the step callback, manually abort parsing if we haven't hit the end of the file after a given number of sample lines and then digest the data in the complete callback. I also added an extra condition to a watcher that caused parsing to happen twice.
@w33ble just pushed some performance improvements. Really glad you caught this issue. After profiling the code I realized there were a combination of things dragging performance down. Give it another whirl and tell me what you think. I was able to add your 700MB CSV to the first wizard step in about 8 seconds without the browser choking. As far as I can tell, the bottleneck is Angular now. With all those columns, it's having to create a lot of DOM elements. If you have any suggestions on optimizing that, I'd be all ears! |
…ance degrades if the user has hundreds or thousands
Fixes #6541
Depends on #6844 and #6842
This PR implements the CSV Upload Add Data Wizard. Some of the highlights of the changes:
upload-wizard
directive which acts as the container for the CSV wizard. This intentionally duplicates some code and structure from the Tail a File wizard to avoid prematurely DRYing things up before we really know exactly what a wizard API needs to look like.parse-csv-step
directive which allows a user to pick and preview their CSVupload-data-step
directive for uploading the CSV to the Kibana _data API and displaying the results to the useruploadCSV
method on the ingest service, for sending File objects to the Kibana _data API.The CSV wizard does not currently include a pipeline creation step. It will be re-added once we have editable pipelines implemented.